// src/pages/task/result/components/ResultHeader.tsx - 结果页面头部组件
import React from 'react';
import { Button, Typography } from 'antd';
import { SyncOutlined } from '@ant-design/icons';

const { Title } = Typography;

interface ResultHeaderProps {
  onRefresh: () => void;
}

const ResultHeader: React.FC<ResultHeaderProps> = ({ onRefresh }) => {
  return (
    <div style={{ 
      display: 'flex', 
      justifyContent: 'space-between', 
      alignItems: 'center',
      marginBottom: '16px',
      padding: '16px 0'
    }}>
      <Title level={3} style={{ margin: 0 }}>执行结果</Title>
      <Button 
        type="primary" 
        icon={<SyncOutlined />}
        onClick={onRefresh}
      >
        刷新
      </Button>
    </div>
  );
};

export default ResultHeader;